I'm constructing a table in an xslt file and would love to use a property's stored name as a label in a the table.. is there a way to do something like this
<td><xsl:value-of select="data[@alias='cancelCompleteLong']/NAME OF PROPERTY THE ALIAS REFERS TO"/></td> <td><xsl:value-of select="data[@alias='cancelCompleteLong']"/></td>
so the final output would be
<td>Cancel Complete Sale (ie property name that the user reads in the backend when filling in the cms)</td>
<td>no fee for sale cancellation (ie value of data referred to by alias)</td>
The ContentTypeAlias is the document-type of your content page, and the PropertyTypeAlias is the property you want to use - in your case "menuPageTitleENG"
Depending on which version of Umbraco you are using... for legacy XML schema (4.0.x):
Get a Property Name from data[@alias='']
Hi All,
I'm constructing a table in an xslt file and would love to use a property's stored name as a label in a the table.. is there a way to do something like this
<td><xsl:value-of select="data[@alias='cancelCompleteLong']/NAME OF PROPERTY THE ALIAS REFERS TO"/></td>
<td><xsl:value-of select="data[@alias='cancelCompleteLong']"/></td>
so the final output would be
<td>Cancel Complete Sale (ie property name that the user reads in the backend when filling in the cms)</td>
<td>no fee for sale cancellation (ie value of data referred to by alias)</td>
You may be able to use the library function GetPropertyTypeName
Brilliant!
thank you so much Tommy!
You are welcome ;-)
Hi all,
I am quite new to umbraco and I need to use the umbraco.library:GetPropertyTypeName to get a value
Could you give an idea on how to do that? The alias of my value is menuPageTitleENG
<xsl:value-of select="umbraco.library:GetPropertyTypeName('String ContentTypeAlias', 'String PropertyTypeAlias')" disable-output-escaping="yes"/>
which one is the String ContentTypeAlias and which one is the String PropertyTypeAlias
I am blind, please help :-)
Hi Giorgos,
The ContentTypeAlias is the document-type of your content page, and the PropertyTypeAlias is the property you want to use - in your case "menuPageTitleENG"
Depending on which version of Umbraco you are using... for legacy XML schema (4.0.x):
For the new XML schema (4.5.x):
Cheers, Lee.
Wow Lee yes that works,
I am using the new schema and now how can I get tha value of the alias please...
Cheers,
Giorgos
Hi Giorgos,
Depending on where you use this, guessing that its in a for-each loop? If so, try this:
If its outside a for-each, then add "$currentPage" to it.
Cheers, Lee.
Hi Lee
Yes is inside a for-each loop and is working fine,
Cheers,
Giorgos
is working on a reply...